class BaseInfo {
    _base_domain = 'https://gitee.com';
    _base_owner = 'lhhcherry';
    _base_repositry = 'StudioOfST';
    _branch = 'master';

    set baseDomain(v) {
        this._base_domain = v;
    }
    set baseOwner(v) {
        this._base_owner = v;
    }
    set baseRepositry(v) {
        this._base_repositry = v;
    }
    get baseDomain() {
        return this._base_domain;
    }
    get baseOwner() {
        return this._base_owner;
    }
    get baseRepositry() {
        return this._base_repositry;
    }

    set branch(v) {
        this._branch = v;
    }
    get branch() {
        return this._branch;
    }
}
console.log("%cbase consts load over", "color: red");
export const baseInfo = new BaseInfo();

class Store {
    _nav_element;
    _content_element;

    set navElement(navElement) {
        this._nav_element = navElement;
    }
    set contentElement(ce) {
        this._content_element = ce;
    }

    get navElement() {
        return this._nav_element;
    }
    get contentElement() {
        return this._content_element;
    }
}

export const store = new Store();


const IGNORE_FILES = [/^\.gitee$/]
export const isIgnore = (filePath) => {
    for (let fileExt of IGNORE_FILES) {
        if (fileExt.test(filePath)) {
            return true;
        }
    }
    return false;
}

// simple stack class.
export const Stack = class StackMock {
    datas = [];

    pop() {
        return this.datas.pop()
    }

    push(data) {
        console.log("stack push:", data)
        this.datas.push(data)
    }

    get length() {
        return this.datas.length;
    }
}